<%--
  Created by IntelliJ IDEA.
  User: User
  Date: 2020/4/23
  Time: 23:04
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
</head>
<body>
    <button style="width: 100px;height: 100px;" id="btnTest"></button>
    <script>
        $(function () {
            $("#btnTest").click(function () {
                var page = "http://localhost:8080/msims/insertCollecProc";
                $.ajax({
                    contentType:'application/json',
                    url: page,
                    data: JSON.stringify
                    ({"insertCollecSample": {"projectName":"浙江硕华医用塑料有限公司","collecTime":"2020-05-13 00:49:37","collecName":"血浆"
                            ,"collecNum":"2","collecQuantity":1500,"collecCategory":"随机","userId":4,"hospital":"新疆三院","department":"123"},
                        "insertProcSample1": {"collecId":4,"procTime":"2020-05-13 00:49:37","countryCode":1234
                                ,"procName":"血清","procQuantity":500,"unit":"ul","proNum":3}
                        ,"insertProcSample2":{"collecId":4,"procTime":"2020-05-13 00:49:37","countryCode":2234
                            ,"procName":"白膜层","procQuantity":500,"unit":"ul","proNum":3}}),
                    dataType:'json',
                    type:'post',
                    success: function (result) {
                        console.log(result);
                    }
                })
            })
        })
    </script>
</body>
</html>
